Subject: Re: interrupt in SAS/C 6.51
From: [email-masked] (James Cooper)
Date: Mon, 7 Mar 1994 14:49:39 GMT
Newsgroups: comp.sys.amiga.programmer

In article <[email-masked]>, [email-masked] (Darrell Grainger) writes:
>I just received my upgrade to SAS/C 6.50 and thought I'd try whipping up a
>few programs. One of the programs I have created uses AddIntServer to add
>a vertical blank interrupt. Here is the set up in the C code:
>
> [code deleted]
>
>Now if I create the function VertBServer using assembler I can get this to
>work fine but what I would like to do (and this is just for experimental
>purposes) is create the function VertBServer using C language. The code
>for VertBServer is simply:
>
>       Signal(task, SIGBREAKF_CTRL_F);
>
>The variable task is a global variable initialized by the main code using:
>
>       task = FindTask(NULL);
>
>I've read some stuff about __interrupt in the SAS/C manual but it is not
>entirely clear. I think I am probably not setting the Z flag when exiting
>the VertBServer function. References to the manuals would actually be
>appreciated.

Look up two SAS specific keywords (you'll need both of them).

        __interrupt     -       page 173, User's Guide Volume 1

                                This will set your code up properly to
                                be an Interrupt function, and will take
                                care of the return code, flags, etc. on
                                exit from the routine.

        __saveds        -       pages 174-175, User's Guide Volume 1

                                This will set up A4 properly on entry to
                                your function, so that you can access
                                global data for your code (such as your
                                'task' variable).

-- 
---------------
Jim Cooper
([email-masked])                             bix: jcooper

Any opinions expressed herein are mine (Mine, all mine!  Ha, ha, ha!),
and not necessarily those of my employer.

Remember, "Euphemisms are for the differently brained."